<%
/*
 * @(#)Status.jsp
 *
 * Project: APEP
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   Janus Liu    2007-05-21 建立
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2007 Auto-Parts E-Procurement Co., Ltd. 
 *        No.251-1 Wuning Road, Shanghai, 200063, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Auto-Parts E-Procurement Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with APEP.
 *
 * Warning:
 * =============================================================================
 * 
 */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page session="false"%>
<%@ page import="framework.core.Srv" %>
<%@ page import="framework.core.DBConnection" %>
<%@ page import="framework.core.DBEngine" %>
<%@ page import="framework.core.Conditions" %>
<%
boolean tDBStatus  = false;
DBConnection tDBConnection=null;


try {
  tDBConnection = DBConnection.open();
  DBEngine.doTableCount(tDBConnection, "T_POSITION", new Conditions());
  tDBStatus = true;
  
  //InputDataSrv srv = new InputDataSrv();
  //srv.doInputCategoryData(tDBConnection, null, null);
}
catch (Exception e) {
}
finally{
	if(tDBConnection!=null){
		tDBConnection.close();
	}
}
boolean tSystemStatus = Srv.isInitialed() && tDBStatus;
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
<%
if (tSystemStatus) {
  out.println("SYSTEM_STATUS=OK");
}
else {
  out.println("SYSTEM_STATUS=ERROR");
}
%>
-->
<%@page import="system.base.InputDataSrv"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>集中采购系统－系统运行状态</title>
</head>
<body>
<center>
<table>
<tr><td>系统运行状态　</td><td><font color='<% if (tSystemStatus    ) out.print("green"); else out.print("red"); %>'><% if (tSystemStatus    ) out.print("正常"); else out.print("异常"); %></font></td></tr>
<tr><td>系统初始化状态</td><td><font color='<% if (Srv.isInitialed()) out.print("green"); else out.print("red"); %>'><% if (Srv.isInitialed()) out.print("正常"); else out.print("异常"); %></font></td></tr>
<tr><td>数据库连接状态</td><td><font color='<% if (tDBStatus        ) out.print("green"); else out.print("red"); %>'><% if (tDBStatus        ) out.print("正常"); else out.print("异常"); %></font></td></tr>
</table>
</center>
</body>
</html>
